package br.ufrj.dcc.tp.ns.types;

public enum PacketType {
	LS("RTPROTOLS"),
	DV ("RTPROTODV"),
	CBR ("CBR");
	
	private String valor;
	
	private PacketType(String valor){
		this.valor = valor;
	}
	public String getValor() {
		return valor;
	}
	
	public static PacketType get(String str) {
		str = str.toUpperCase();
		
		for(PacketType p : PacketType.values()) {
			if(p.getValor().equals(str)) {
				return p;
			}
		}
		
		return null;
	}
}
